package com.jye.rseven.service;

import com.jye.rseven.domain.Courses;
import com.jye.rseven.domain.User;

import java.util.List;

public interface CoursesService {

    //通过id查找
    Courses findCourseByIdAndUId(int id,int uId);

    //查找全部课程
    List<Courses> findAllCourses(int skip, int limit);

    int addCourse(Courses courses);

    int updateCourse(Courses courses);

    List<Courses> findHotCourses(int uId,int skip, int limit);

    List<Courses> findMyCoursesByUId(int uId, int skip, int limit);

    List<Courses> findTeacherCoursesByUId(int uId);

    List<User> findCourseUserDetailByCId(int cId);

    List<User> findCoursesNotClassUserById(int id);

    List<Courses> findNewestCourses(int skip, int limit);

    List<Courses> findCoursesByType(String type, int skip, int limit);

    String userBuyCourse(int uId, int cId);

    Courses findCourseById(Integer id);

    List<Courses> findCoursesByName(String name);
}
